<?php
class resource_config_image extends resource_config_abstract {
	
	public static function setConfig($conf) {
		self::$_config = $conf;
	}
		
	public static function getSizes($def = array()) {
		return isset(self::$_config['sizes']) ? self::$_config['sizes'] : $def;
	}
	
	public static function getMinDimension($def = array('width' => 0, 'height' => 0)) {
		return isset(self::$_config['min-dimension']) ? self::$_config['min-dimension'] : $def;
	}
	
	public static function getMaxDimension($def = array('width' => 0, 'height' => 0)) {
		return isset(self::$_config['max-dimension']) ? self::$_config['max-dimension'] : $def;
	}
	
	public static function getWatermark() {
		return isset(self::$_config['watermark']) && is_array(self::$_config['watermark']) ? self::$_config['watermark'] : false;
	}
	
}

if(!resource_config_image::$IsLoaded && file_exists($filename = _DIRECTORY_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'image.php')) {
	resource_config_image::setConfig(include_once($filename));
}
